package com.wuyou.simple;

/**
 * 重新排列数组
 */
public class Shuffle {

    public static void main(String[] args) {
        System.out.println(1 % 2);
    }

    public static int[] solution_1(int[] nums, int n) {
        int[] res = new int[nums.length];
        int left = 0;
        int right = n;
        for (int i = 0; i < nums.length; i++) {
            if (i % 2 == 0) {
                res[i] = nums[left++];
            } else {
                res[i] = nums[right++];
            }
        }
        return res;
    }
}
